﻿print('欢迎使用学生操作系统V1版本\n查询操作请按1\n插入操作请按2\n删除操作请按3\n修改操作请按4\n退出操作请输入over\n退出信息操作goout')
name = []
number = {}
list1 = []
secrect_information = dict.fromkeys(name)
while True:
        direct = input('请输入您的指令:')
        if direct == '1':
                print(name)
                if len(name)==0:
                        print('暂无学生记录在案!!')
        elif direct == '2':
                direct_name = input('请输入要插入的学生姓名:')
                name.append(direct_name)
                print('插入操作成功!')
        elif direct == '3':
                direct_name = input('请输入要删除的学生姓名:')
                if direct_name not in name:
                        print(name)
                        print('查无此人,请重新输入!!')
                        continue
                name.remove(direct_name) 
                print('删除操作成功!')
        elif direct == '4':
                direct_name1 = input('请输入被更改的学生姓名:')
                if direct_name1 not in name:
                        print('查无此人,请重新输入!!')
                        print(name)
                        continue
                direct_name2 = name.index(direct_name1)
                name.remove(direct_name1)
                direct_name4 = input('请输入要改的名:')
                name.insert(direct_name2,direct_name4)
                print('修改操作成功!')
        elif direct == 'over':
                print('学生系统操作结束!')
                break
        elif direct == 'encryption':
                print('secret_information\n < 载入私密信息 :')
                print()
                print('原学生姓名列表:',name)
                #list1=[]
                
                while True:
                        study_number = input('请输入学号：')
                        number = dict.fromkeys(study_number)
                        direct_name = input('请输入学生姓名:')
                        information = input('请插入信息:')
                        list1.append(direct_name)
                        list1.append(information)
                        if information == 'goout':
                                print('已返回操作界面!')
                                break
                        if direct_name not in name:
                                print('查无此人,请在下方name中选择')
                                print(name)
                                continue
                        #for direct_name in name:
                        number[study_number] = list1
                        print(number)
                        for number[study_name] in range(1):
                                number[study_name] = []
                                

                                
                        
                        #for i in range(len(name)):
                                #if direct_name == name[i]:
                                        #name.insert(i+1,information)
                                        #print('现学生信息列表如下')
                                        #print(name)
                                        #continue
                        #if direct_name == name[(len(name)-1)]:
                                #name.append(information)
                                #print(name)
                                #continue
                                        
                                                
                        
                        

                                #if direct_name in name:
                                        #print('name:',name)
                                        #print('Key:',direct_name)
                                        #n.append(information)
                                        #secrect_information[direct_name] = n
                                        #print('%s' % (secrect_information))
                                        #break
                                
                        
                                #if direct_name == name[0]:
                                        #list1.append(information)
                                        #secrect_information[direct_name] = list1
                                
                        #print('操作成功如下')
                        #print()
                        #print('当前学生信息表:',secrect_information)

        else:
                print('无此指令及操作,请重新输入!!')
                        
                        
                        
                 
                
                
                       
                        

                


    
        





    
                








	

	
